package cn.tedu.oa_system.pojo;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @Author MW
 * @Description tableName: position
 * @CreateDate 2023/1/4
 */
@TableName(value = "position")
@Data
public class Position implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId
    private Long positionId;

    private Integer level;

    private String name;

    private String description;

    private Long deptId;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Position position = (Position) o;
        return Objects.equals(positionId, position.positionId) && Objects.equals(level, position.level) && Objects.equals(name, position.name) && Objects.equals(description, position.description) && Objects.equals(deptId, position.deptId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(positionId, level, name, description, deptId);
    }

    @Override
    public String toString() {
        return "Position{" +
                "positionId=" + positionId +
                ", level=" + level +
                ", name='" + name + '\'' +
                ", description='" + description + '\'' +
                ", deptId=" + deptId +
                '}';
    }
}
